package com.woniuxy.microgoldservice.mapper;

import com.woniuxy.microgoldservice.bean.BankInfo;
import com.woniuxy.microgoldservice.bean.GoldOrderDAO;
import com.woniuxy.microgoldservice.bean.GoldPriceInfo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author hongbin
 * @date 2021-04-07 16:44
 * Description：
 */

public interface GoldPriceMapper {

    List<GoldPriceInfo> selectAll();

    List<GoldPriceInfo> selectAllGoldPrice(Long proId);

    int insert(GoldPriceInfo goldPriceInfo);

    int update(GoldPriceInfo goldPriceInfo);

    int delete(Long proId);

    List<GoldPriceInfo> selectTodayGoldPrice(Long proId);

    List<GoldPriceInfo> selectOneMonth(Long proId);

    List<GoldPriceInfo> selectHalfYear(Long proId);

    List<GoldPriceInfo> selectOneYear(Long proId);

    GoldPriceInfo selectYesterdayReferencePrice(Long proId);

    Long selectProId();

    GoldPriceInfo getNowGoldPrice();

    Double getNowARP(String username);

    int setEarnings(@Param("yesterdayPrice") Double yesterdayPrice);

    GoldPriceInfo getYesterdayPrice(Long proId);

    int setTotalEarnings();

    GoldPriceInfo selectNowPrice(Long id);

    int insertZeroTime(GoldPriceInfo goldPriceInfo);

    List<BankInfo> selectBank();

    BigDecimal selectYesterdayEndGoldPrice();

    GoldPriceInfo getTodayGoldPrice(Long proId);

    int setTodayEarnings(BigDecimal todayGoldPrice);

    int setYesterdayEarnings(List<GoldOrderDAO> goldOrderDAOS);

    int setHoldPrice();
}
